package com.wct.struct;

import javolution.io.Struct;

public class SmsPacket extends Struct {
	public Unsigned8 StartId;//0x5f
	public Unsigned8 CmdType;//0:命令,1:app数据(android/ios/html),2:短信数据,3:微信数据
	public Unsigned8 Cmd;//0:登录,1:data:,2:keepalive,3:gps err,4:撤销
	public Unsigned8 DataLen ;//地址长度澹(中文地址长度，包括了所有码)
	public Unsigned8[] Data;//gps的中文地址，已经为unicode码，服务器器需要转换，device需要翻译
//	unsigned int	LinkId;//0:服务器,1:设备
	public final Unsigned8 EndId;//0x01	
	@Override
	public boolean isPacked() {
        return true; // MyStruct is packed.
    }
	
	public SmsPacket(int length){
		
		StartId = new Unsigned8();
		CmdType = new Unsigned8();
		Cmd = new Unsigned8();
		DataLen = new Unsigned8();
		Data = array(new Unsigned8[length]);
		EndId = new Unsigned8();
	}
}
